package pl.diagnoser.client.dto;

import com.google.gwt.user.client.rpc.IsSerializable;

public class UserDTO implements IsSerializable {

	private long loginID;
	private String name;
	private String lastname;
	private String login;
	private String password;
	private int isAdministrator;
	private Long appId;
	private int isSearchMode;
	
	public UserDTO() {}
	public UserDTO(long loginID, String name, String lastname, String login,
			String password, int isAdministrator) {
		super();
		this.loginID = loginID;
		this.name = name;
		this.lastname = lastname;
		this.login = login;
		this.password = password;
		this.isAdministrator = isAdministrator;
	}
	public UserDTO(String name, String lastname, String login,
			String password, int isAdministrator) {
		super();
		this.name = name;
		this.lastname = lastname;
		this.login = login;
		this.password = password;
		this.isAdministrator = isAdministrator;
	}

	public long getLoginID() {
		return loginID;
	}
	
	public void setLoginID(long loginID) {
		this.loginID = loginID;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getLastname() {
		return lastname;
	}
	
	public void setLastname(String lastname) {
		this.lastname = lastname;
	}
	
	public String getLogin() {
		return login;
	}
	
	public void setLogin(String login) {
		this.login = login;
	}
	
	public String getPassword() {
		return password;
	}
	
	public void setPassword(String password) {
		this.password = password;
	}
	
	public int getIsAdministrator() {
		return isAdministrator;
	}
	
	public void setIsAdministrator(int isAdministrator) {
		this.isAdministrator = isAdministrator;
	}
	
	public boolean isAdministrator() {
		if(this.isAdministrator == 1)
			return true;
		else
			return false;
	}
	
	public Long getAppId() {
		return this.appId;
	}
	
	public void setAppId(Long appId) {
		this.appId = appId;
	}
	
	public int getIsSearchMode() {
		return isSearchMode;
	}
	
	public void setIsSearchMode(int isSearchMode) {
		this.isSearchMode = isSearchMode;
	}
}
